package daoTest;

import org.junit.Test;

import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import per.kongtouxu.dao.UserDao;
import per.kongtouxu.domain.pojo.User;
import per.kongtouxu.service.Impl.UserServiceImpl;

import java.io.IOException;
//声明这个是spring测试内
@RunWith(SpringJUnit4ClassRunner.class)
//声明配置文件
@ContextConfiguration(locations = {"classpath:applicationContext.xml","classpath:springMVC.xml"})
public class DaoTest {
    @Test
    public void test01() throws IOException {
        int positiveVal = 100;
        int negativeVal = (~(positiveVal - 1));
        System.out.println(negativeVal);
    }
    @Autowired
    private UserDao userDao;
    @Test
    public void test02(){
        userDao.updateScoreByUserId(100,10);
    }
}
